home *** CD-ROM | disk | FTP | other *** search
/ PC User 2002 April / Disc 2 / PCUSER0402D2.iso / software / utils / files / wincron.exe / data1.cab / Sample_Scripts / date_test.tg < prev    next >
Encoding:
Text File  |  2001-10-20  |  2.1 KB  |  82 lines

  1. ## date_test
  2. # this script uses the internal, debugging directive '-date'
  3. # -date simply tells WinCron to interpret the argument as a date and print 
  4. # out its interpretation. THEY SHOULD MATCH! If they don't then you are not entering
  5. # the date in the same format that you have set in your regional settings in the Windows
  6. # Control Panel.
  7. # Be aware, while the following script runs fine on my system, it may fail on your system.
  8. # it is your responsibility to make sure you give well formed dates to WinCron.
  9.  
  10. {
  11.     -name date_test
  12.     -start    
  13.     -action -call 12hour
  14.     #-action -inc 0 0 0 1
  15. }
  16.  
  17. ## Test 12 hour format
  18. # Set your regional settings 'time format' to 12 hour format to run this test.
  19. # Note: Running the 12 hour test against a system setup with 24 hour time format, will succeed.
  20. {
  21.     -name 12hour
  22.     
  23.     # test date time
  24.     -action -date 8/3/99 12:21:00 AM
  25.  
  26.     -action -date 8/3/99 1:21:00 AM
  27.     -action -date 8/3/99 1:21:00 PM
  28.  
  29.     -action -date 8/3/99 11:21:00 AM
  30.     -action -date 8/3/99 11:21:00 PM
  31.  
  32.     # test time only
  33.     -action -date -time 12:21:00 AM
  34.     -action -date -time 12:21:00 PM
  35.  
  36.     -action -date -time 1:21:00 AM
  37.     -action -date -time 1:21:00 PM
  38.  
  39.     -action -date -time 11:21:00 AM
  40.     -action -date -time 11:21:00 PM
  41.  
  42.     # okay
  43.     #-action -date 8-auG-99 2:21:00 PM
  44.  
  45.     #-action -date 08-auG-1999 2:21:00 PM
  46.  
  47.     -action -print 12 hour tests complete!
  48. }
  49.  
  50. ## Test 24 hour format
  51. # Set your regional settings 'time format' to 24 hour format to run this test.
  52. # Note: Running the 24 hour test against a system setup with 12 hour time format, will fail.
  53. {
  54.     -name 24hour
  55.  
  56.     # test date time
  57.     -action -date 8/3/99 0:21:00
  58.     
  59.     -action -date 8/3/99 1:21:00
  60.     -action -date 8/3/99 13:21:00
  61.  
  62.     -action -date 8/3/99 11:21:00
  63.     -action -date 8/3/99 23:21:00
  64.  
  65.     # test time only
  66.     -action -date -time 0:21:00
  67.     -action -date -time 12:21:00
  68.  
  69.     -action -date -time 1:21:00
  70.     -action -date -time 13:21:00
  71.  
  72.     -action -date -time 11:21:00
  73.     -action -date -time 23:21:00
  74.  
  75.     # okay
  76.     #-action -date 8-auG-99 2:21:00
  77.  
  78.     #-action -date 08-auG-1999 2:21:00
  79.  
  80.     -action -print 24 hour tests complete!
  81. }
  82.